package util.introspection
{
	import mx.collections.ArrayCollection;
	
	public class IntrospectionUtil
	{
		public static function dumpProperties(o:Object): void {
			trace("properties of " + o + ":");
			for (var prop: String in o) {
				trace(prop + " = " + o[prop]);
			}
		}

		public static function propertiesToCollection(o:Object): ArrayCollection {
			var propColl: ArrayCollection = new ArrayCollection();
			for (var prop: String in o) {
				var propData:Object = new Object();
				propData["property"] = prop;
				propData["value"] = o[prop];
				propColl.addItem(propData);
			}
			return propColl;
		}

	}
}